#ifndef ABSTRACT_FACTORY_PATTERN_H
#define ABSTRACT_FACTORY_PATTERN_H

#include <QString>

class Rectangle
{
    public:
        virtual ~Rectangle() {}
        virtual QString getName() = 0;
};

class RedRectangle : public Rectangle
{
public:
    ~RedRectangle() {}
    QString getName() override;
};

class BlueRectanle : public Rectangle
{
public:
    ~BlueRectanle() {}
    QString getName() override;
};

class Square
{
public:
    virtual ~Square() {}
    virtual QString getName() = 0;
};

class RedSquare : public Square
{
public:
    ~RedSquare() {}
    QString getName() override;
};

class BlueSquare : public Square
{
public:
    ~BlueSquare() {}
    QString getName() override;
};


class AbstractFactory
{
public:
    virtual Rectangle * getRectangle() = 0;
    virtual Square * getSquare() = 0;
};

class RedFactory : public AbstractFactory
{
public:
    Rectangle * getRectangle() override;
    Square * getSquare() override;
};

class BlueFactory : public AbstractFactory
{
public:
    Rectangle * getRectangle() override;
    Square * getSquare() override;
};

#endif // ABSTRACT_FACTORY_PATTERN_H
